package unit4_1015.test1;
/*
 * Student类的父类Object.
 */

public class Student {
	
	private int id;//学号
	private String name;//姓名
	private int age;//年龄
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public Student() {
		super();
	}
	
	
	
	public Student(int id, String name, int age) {
		//super();
		this.id = id;
		this.name = name;
		this.age = age;
	}
	//重写
	@Override
	public boolean equals(Object obj) {
		Student other=(Student) obj;//对象名other
		if(this.id==other.id && this.name==other.name) {
			return true;
		}		
		return false;
	}
	
	
}
